import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/data/HomeView.vue'
import TempView from '../views/data/tempView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    // redirect: "/data"
  },
  {
    path: "/data",
    component: () => import("@/views/data"),
    name: "Data",
    meta: {
      title: "大数据",
    }
  },
  {
    path: "/ad",
    component: () => import("@/views/ad"),
    name: "Ad",
    meta: {
      title: "广告",
    }
  },
  {
    path: "/map",
    component: () => import("@/views/data/components/MapChartData"),
    name: "Data",
    meta: {
      title: "大数据",
    }
  },
  {
    path: '/temp',
    name: 'temp',
    component: TempView,
    // redirect: "/data"
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
